// by Xeno

private ["_mash","_m_name"];
_mash = player GetVariable "medic_tent";
if (isNil "_mash") exitWith {};
player playMove "AinvPknlMstpSlayWrflDnon_medic";
sleep 3;
waitUntil {animationState player != "AinvPknlMstpSlayWrflDnon_medic"};
if (!alive player) exitWith {localize "MSG_DOM_DIEDBEFOREACTION" call XfGlobalChat};
diag_log Format["Remove %1",(player getVariable "medic_tent")];
deleteVehicle _mash;
player SetVariable  ["medic_tent", objNull];

localize "MSG_DOM_MASHREMOVED" call XfGlobalChat;
player SetVariable  ["d_medtent", []];
_m_name = format [localize "MSG_DOM_MASHMRK", str(player)];
["d_p_o_r", [str(player),_m_name]] call XNetCallEvent;
